<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">
<table cellspacing="2" cellpadding="2" width="600">
	<tr><td align="center" height="60"><h1>{lang admin.table_scheme.view.title} {$setting[Version]}</h1></td></tr>
	<tr><td height="100" align="center">{lang admin.table_scheme.view.datetime}{echo date('Y-m-d H:i');}</td></tr>
</table>
<!--{loop $table_scheme $key $scheme}-->
<!--{code $table = $scheme[table];}-->
<!--{code $join_tables = $scheme[join];}-->
<h3>{echo $key + 1;}、{$table[CNAME]}(tbl_{$table[IDENTITY]})</h3>
<table width="700" cellspacing="2" cellpadding="2" bgcolor="#696969">
    <tr bgcolor="#696969">
        <td width="220">
        	{lang admin.table_scheme.view.th.column}
        </td>
        <td>
        	{lang admin.table_scheme.view.th.name}
        </td>
        <td width="80">
        	{lang admin.table_scheme.view.th.type}
        </td>
        <td width="50">
        	{lang admin.table_scheme.view.th.length}
        </td>
        <td width="70">
        	{lang admin.table_scheme.view.th.default}
        </td>
    </tr>
    <tr bgcolor="#99B4D1">
        <td>{echo strtoupper($table[IDENTITY]);}ID</td>
        <td>{lang admin.table_scheme.view.td.primary}</td>
        <td>bigint</td>
        <td>20</td>
        <td>null</td>
    </tr>
    <!--{loop $join_tables $item}-->
    <!--{if $table['JOINS'][$item['IDENTITY']]}-->
	    <!--{if $item['IDENTITY'] == 'user'}-->
	    <tr bgcolor="#CCCCCC">
	        <td>USERID</td>
	        <td>{lang admin.table_scheme.view.td.userid}({lang admin.table_scheme.view.td.join})</td>
	        <td>bigint</td>
	        <td>20</td>
	        <td>0</td>
	    </tr>
	    <tr bgcolor="#CCCCCC">
	        <td>USERNAME</td>
	        <td>{lang admin.table_scheme.view.td.username}</td>
	        <td>varchar</td>
	        <td>30</td>
	        <td>''</td>
	    </tr>
	    <tr bgcolor="#CCCCCC">
	        <td>EDITTIME</td>
	        <td>{lang admin.table_scheme.view.td.edittime}</td>
	        <td>datetime</td>
	        <td>0</td>
	        <td>null</td>
	    </tr>
	    <!--{else}-->
	    <tr bgcolor="#CCCCCC">
	        <td>{echo strtoupper($item[IDENTITY]);}ID</td>
	        <td>{$item[CNAME]}({lang admin.table_scheme.view.td.join})</td>
	        <td>bigint</td>
	        <td>20</td>
	        <td>0</td>
	    </tr>
	    <!--{/if}-->
    <!--{/if}-->
    <!--{/loop}-->
    <!--{loop $table[COLUMNS] $_loop $column}-->
    <tr bgcolor="#FFFFFF">
        <td>{$column[identity]}</td>
        <td>{$column[name]}</td>
        <td>{$column[type]}</td>
        <td>{$column[length]}<!--{if $column[type] == 'decimal'}-->,2<!--{/if}--></td>
        <td>
        <!--{if $column[type] == 'tinyint' || $column[type] == 'int' || $column[type] == 'decimal'}-->0<!--{/if}-->
        <!--{if $column[type] == 'varchar'}-->''<!--{/if}-->
        <!--{if $column[type] == 'datetime' || $column[type] == 'text'}-->null<!--{/if}-->
        </td>
    </tr>
    <!--{/loop}-->
    <!--{loop $table[FILES] $key $file}-->
    <tr bgcolor="#FFFFE1">
        <td>{$file}</td>
        <td>{lang admin.table_scheme.view.td.file}{echo $key + 1;}</td>
        <td>varchar</td>
        <td>200</td>
        <td>''</td>
    </tr>
    <!--{/loop}-->
    </tbody>
</table>

<!--{if $table['REMARK']}-->
<table cellspacing="2" cellpadding="2" width="600">
	<tr><td colspan="2">{lang admin.table_scheme.view.td.remark}</td></tr>
	<tr><td width="20"></td><td>{$table[REMARK]}</td></tr>
</table>
<!--{/if}-->

<!--{/loop}-->
</html>